//
// Created by gacmy on 2020/7/1.
//

#ifndef TOUCHMAKE_SEARCHFILE_H
#define TOUCHMAKE_SEARCHFILE_H
#include <cstring>
#include <sys/stat.h>
#include <dirent.h>
#include <stdlib.h>
#include <vector>
#include <limits.h>
#include <iostream>
using namespace std;
#define FTW_F 1 //file other than direcoty
#define FTW_D 2 //directory
#define FTW_DNR 3 //directory that can not be read
#define FTW_NS  4 //file that we can not stat
 //contains full pathname for everyfile
int recordFileFunc1(const char *pathname,const struct stat *statptr,int type);
//typedef int RecordFileFunc(const char*,const struct state*, int);



int myftw(char*,int(*recordFileFunc)(const char*,const struct state*, int));

int dopath(int(*recordFileFunc)(const char*,const struct state*, int));

vector<string> execute(char *dirPath);



#endif //TOUCHMAKE_SEARCHFILE_H
